package com.ma.service.order;

import com.ma.dao.order.OrderMapper;
import com.ma.dto.OrderQueryParam;
import com.ma.pojo.Order;
import com.ma.pojo.OrderDetails;

import java.util.HashMap;
import java.util.List;

public class OrderServiceImpl implements OrderService{
    private OrderMapper orderMapper;

    public void setOrderMapper(OrderMapper orderMapper) {
        this.orderMapper = orderMapper;
    }
    @Override
    public int queryAllOrder() {
        return orderMapper.queryAllOrder();
    }

    @Override
    public String queryOrder(HashMap map) {
        return orderMapper.queryOrder(map);
    }

    @Override
    public Order queryByOrderId(String orderId) {
        return orderMapper.queryByOrderId(orderId);
    }

    @Override
    public Order queryByCustomerId(String customerId) {
        return orderMapper.queryByCustomerId(customerId);
    }

    @Override
    public String queryOrderDetailsById(String orderId) {
        return orderMapper.queryOrderDetailsById(orderId);
    }

    @Override
    public OrderDetails queryOrderDetails(String ID) {
        return orderMapper.queryOrderDetails(ID);
    }

    @Override
    public float queryTotalPrice() {
        return orderMapper.queryTotalPrice();
    }

    @Override
    public List<Order> queryAll() {
        return orderMapper.queryAll();
    }

    @Override
    public List<Order> list(OrderQueryParam queryParam) {
        return orderMapper.getList(queryParam);
    }
}
